DEFINITION MODULE ThreeDee;

(*
  Chapter 5: three dimensional transforms
*)

FROM QuickDrawTypes IMPORT Point;

EXPORT QUALIFIED Point3D, SetPoint3D,
		 SetRot, SetScale, SetTranslation, 
		 SetPerspective, TransformSRT, Project;

TYPE
  Point3D = RECORD
	      X, Y, Z: REAL;
	    END;
	    
PROCEDURE SetPoint3D( x, y, z: REAL; VAR p: Point3D );

PROCEDURE SetRot( rotX, rotY, rotZ: REAL );

PROCEDURE SetScale( scaleX, scaleY, scaleZ: REAL );

PROCEDURE SetTranslation( transX, transY, transZ: REAL );

PROCEDURE SetPerspective( screenZ, sourceZ: REAL );

PROCEDURE TransformSRT( in: Point3D; VAR out: Point3D );

PROCEDURE Project( in: Point3D; VAR out: Point );

END ThreeDee.